package cn.softgame.cms.secure.organization.service;
import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.softgame.cms.secure.organization.domain.OrganizationBean;
import cn.softgame.cms.secure.organization.persistence.OrgMapper;

@Service
public class OrgServiceImpl implements IOrgService{
	@Autowired
	private OrgMapper orgMapper;
	
	@Override
	public List<OrganizationBean> loadOrgsData() {
		
		List<OrganizationBean> s = new ArrayList<OrganizationBean>();
		
		s = orgMapper.loadOrgsData();
		
		return s;
	}
	@Override
	public void save(OrganizationBean organization) {
		orgMapper.save(organization);
		
	}
	
	@Override
	public void delete(String orgId) {
		
		orgMapper.delete(orgId);
		
	}
	/***/
	@Override
	public void update(OrganizationBean organization) {
		orgMapper.update(organization);
		
	}

	
	
	
	@Override
	public OrganizationBean queryOrgByOrgId(String orgId) {
		
		return orgMapper.queryOrgByOrgId(orgId);
	}
}
